// 仪表盘页面样式
@use '../variables' as *;
.dashboard {
    .sample-data-notice {
        margin-bottom: 24px;
    }
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 24px;
        margin-bottom: 32px;
    }
    .stat-card {
        background: white;
        border-radius: $radius-lg;
        padding: 24px;
        box-shadow: $shadow-md;
        display: flex;
        align-items: center;
        transition: all $transition-normal;
        &:hover {
            transform: translateY(-2px);
            box-shadow: $shadow-lg;
        }
        .stat-icon {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 16px;
            color: white;
            font-size: 24px;
        }
        .stat-content {
            flex: 1;
            .stat-title {
                margin: 0 0 8px 0;
                font-size: 14px;
                color: $text-secondary;
                font-weight: $font-medium;
            }
            .stat-value {
                margin: 0 0 4px 0;
                font-size: 2rem;
                font-weight: $font-bold;
                color: $text-primary;
            }
            .stat-change {
                margin: 0;
                font-size: 12px;
                display: flex;
                align-items: center;
                gap: 4px;
                &.up {
                    color: #10b981;
                }
                &.down {
                    color: #ef4444;
                }
                .el-icon {
                    font-size: 12px;
                }
            }
        }
    }
    .dashboard-content {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 32px;
        @media (max-width: 1024px) {
            grid-template-columns: 1fr;
        }
    }
    .recent-posts,
    .quick-actions {
        background: white;
        border-radius: $radius-lg;
        padding: 24px;
        box-shadow: $shadow-md;
    }
    .section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        h2 {
            margin: 0;
            font-size: 1.25rem;
            font-weight: $font-bold;
            color: $text-primary;
        }
        .view-all {
            color: #667eea;
            text-decoration: none;
            font-size: 14px;
            font-weight: $font-medium;
            transition: color $transition-normal;
            &:hover {
                color: #764ba2;
            }
        }
    }
    .posts-list {
        .post-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 0;
            border-bottom: 1px solid $border-light;
            &:last-child {
                border-bottom: none;
            }
            .post-info {
                flex: 1;
                .post-title {
                    margin: 0 0 8px 0;
                    font-size: 16px;
                    font-weight: $font-medium;
                    color: $text-primary;
                }
                .post-meta {
                    margin: 0;
                    font-size: 14px;
                    color: $text-secondary;
                    .category {
                        background: rgba(102, 126, 234, 0.1);
                        color: #667eea;
                        padding: 2px 8px;
                        border-radius: 12px;
                        font-size: 12px;
                        margin-right: 12px;
                    }
                    .date {
                        color: $text-secondary;
                    }
                }
            }
            .post-actions {
                display: flex;
                gap: 8px;
            }
        }
    }
    .actions-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        @media (max-width: 768px) {
            grid-template-columns: 1fr;
        }
    }
    .action-card {
        padding: 20px;
        border: 1px solid $border-light;
        border-radius: $radius-md;
        text-align: center;
        cursor: pointer;
        transition: all $transition-normal;
        &:hover {
            border-color: #667eea;
            transform: translateY(-2px);
            box-shadow: $shadow-md;
        }
        .action-icon {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 12px;
            color: white;
            font-size: 20px;
        }
        .action-title {
            margin: 0 0 8px 0;
            font-size: 16px;
            font-weight: $font-medium;
            color: $text-primary;
        }
        .action-desc {
            margin: 0;
            font-size: 14px;
            color: $text-secondary;
            line-height: 1.4;
        }
    }
}